package com.algorithm;

/**
 * 旋转字符串
 */
public class RotateString {

    public static boolean rotateString(String s, String goal) {
        String newS=s+s;
        return newS.contains(goal)&&s.length()==goal.length();
    }

    public static void main(String[] args) {
        String a="abcde";
        String b="cdeab";
        System.out.println(rotateString(a,b));
    }
}
